package com.fbms.module.system.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fbms.module.system.bean.entity.SysDept;
import com.fbms.module.system.dao.SysDeptMapper;
import com.fbms.module.system.service.ISysDeptService;
import org.springframework.stereotype.Service;

import javax.management.Query;

/**
 * 类描述：TODO
 *
 * @ClassName SysDeptServiceImpl
 * @Author HappyBoy
 * @Date 2023-04-06 16:48
 **/
@Service
public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> implements ISysDeptService {

    /**
     * 部门Mapper
     */
    private SysDeptMapper deptMapper;

    /**
     * 获取部门列表（分页）
     * @param dept 部门信息
     * @param page 分页信息
     * @return 部门列表
     */
    @Override
    public IPage<SysDept> getDeptPageList(SysDept dept, IPage<SysDept> page) {
        QueryWrapper<SysDept> query = new QueryWrapper<>(dept);
        return deptMapper.selectPage(page, query);
    }
}
